function HashMap(){
	this.length=0;
	this.prefix="hashmap_prefix_20040716_";
}

HashMap.prototype.put = function(key,value){
	if(this.containsKey(key)==true){
		return ;
	}
	this[this.prefix+key] = value;
	this.length++;
};

HashMap.prototype.get=function(key){
	return typeof this[this.prefix+key]=="undefined"?null:this[this.prefix+key];
};

HashMap.prototype.keySet=function(){
	var arrKeySet=new Array();
	var index=0;
	for(var strKey in this){
		if(strKey.substring(0,this.prefix.length)==this.prefix){
			arrKeySet[index++] = strKey.substring(this.prefix.length);
		}
	}
	return arrKeySet.length==0?null:arrKeySet;
};

HashMap.prototype.values=function(){
	var arrValues=new Array();
	var index=0;
	for(var strKey in this){
		if(strKey.substring(0,this.prefix.length)==this.prefix){
			arrValues[index++]=this[strKey];
		}
	}
	return arrValues.length==0?null:arrValues;
};

HashMap.prototype.size=function(){
	return this.length;
};

HashMap.prototype.remove=function(key){
	delete this[this.prefix+key];
	this.length--;
};

HashMap.prototype.clear=function(){
	for(var strKey in this){
		if(strKey.substring(0,this.prefix.length)==this.prefix){
			delete this[strKey];
		}
	}
	this.length=0;
};

HashMap.prototype.isEmpty=function(){
	return this.length==0;
};

HashMap.prototype.containsKey=function(key){
	for(var strKey in this){
		if(strKey==this.prefix+key){
			return true;
		}
	}return false;
};

HashMap.prototype.containsValue=function(value){
	for(var strKey in this){
		if(this[strKey]==value){
			return true;
		}
	}
	return false;
};

HashMap.prototype.putAll=function(map){
	if(map==null){
		return ;
	}
	if(map.constructor!=HashMap){
		return ;
	}
	var arrKey=map.keySet();
	var arrValue=map.values();
	for(var i in arrKey){
		this.put(arrKey[i],arrValue[i]);
	}
};

HashMap.prototype.toString=function(){
	var str="";
	for(var strKey in this){
		if(strKey.substring(0,this.prefix.length)==this.prefix){
			str+=strKey.substring(this.prefix.length)+"   :   "+this[strKey]+"\r\n";
		}
	}
	return str;
};
